1 package tw.com.javaworld.CH19;
2 
3 import java.io.Serializable;
4 
5 public class Book implements Serializable {
6 
7     private String name;
8     private String author;
9     private String publisher;
10    private float price;
11    private int quantity;
12
13    public Book() {
14    }
15
16    public String getName() {
17        return name;
18    }
19    public String getAuthor() {
20        return author;
21    }
22    public String getPublisher() {
23        return publisher;
24    }
25    public void setPrice(float newPrice) {
26        price = newPrice;
27    }
28    public float getPrice() {
29        return price;
30    }
31    public void setQuantity(int newQuantity) {
32        quantity = newQuantity;
33    }
34    public int getQuantity() {
35        return quantity;
36    }
37    public void setPublisher(String newPublisher) {
38        publisher = newPublisher;
39    }
40    public void setAuthor(String newAuthor) {
41        author = newAuthor;
42    }
43    public void setName(String newName) {
44        name = newName;
45    }
46}